'Declaration Public Overloads Shared Function Create(Of T As {New, Struct})( _ ByVal device As Device, _ ByVal bindFlags As BindFlags, _ ByVal data() As T, _ Optional ByVal sizeInBytes As System.Integer, _ Optional ByVal usage As ResourceUsage, _ Optional ByVal accessFlags As CpuAccessFlags, _ Optional ByVal miscFlags As ResourceMiscFlags, _ Optional ByVal structureByteStride As System.Integer _ ) As Buffer
public static Buffer Create<T>( Device device, BindFlags bindFlags, T[] data, System.int sizeInBytes, ResourceUsage usage, CpuAccessFlags accessFlags, ResourceMiscFlags miscFlags, System.int structureByteStride ) where T: new(), struct
Parameters
- device
- The device with which to associate the buffer.
- bindFlags
- Flags specifying how the buffer will be bound to the pipeline.
- data
- Initial data used to initialize the buffer.
- sizeInBytes
- The size, in bytes, of the buffer. If 0 is specified, sizeof(T) * data.Length is used.
- usage
- The usage pattern for the buffer.
- accessFlags
- Flags specifying how the buffer will be accessible from the CPU.
- miscFlags
- Miscellaneous resource options.
- structureByteStride
- The size (in bytes) of the structure element for structured buffers.
Type Parameters
- T
- Type of the data to upload
Return Value
An initialized buffer